package com.xuecheng.search.service;

import com.xuecheng.commons.model.dto.CoursePubIndexDto;
import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.CoursePubIndexVo;
import com.xuecheng.commons.model.vo.ResponseResult;

import java.io.IOException;

public interface SearchService {
    //数据库数据同步至es
    void mysqlToEs(Long coursePubId) throws Exception;

    // 条件分页查询
    ResponseResult<CoursePubIndexVo> search(PageRequest pageRequest, CoursePubIndexDto coursePubIndexDto) throws IOException;

    //数据库删除同步至es
    void mysqlDeleteToEs(Long courseId) throws IOException;

    //根据id查询课程
    ResponseResult<CoursePubIndexVo> findById(String id) throws IOException;
}
